<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>hello_react</title>
</head>

<body>
    "<form action="#" method="post">
        <div class="form_wrap">
        <br>
        <div class="form_cell_title">一、您14天内是否有发热、咳嗽等呼吸道症状？(请在口内打“√”）</div>
        <div class="form_cell_item_wrap">
        <div class="form_cell_row_wrap">
        <label class="form_cell_single_wrap">
        <input class="radio_class_name" name="topic1" type="radio" value="$[red]是"/>是</label>
        <label class="form_cell_single_wrap">
        <input class="radio_class_name" name="topic1" type="radio" value="否"/>否</label>
        </div>
        </div>
        <br>
        <div class="form_cell_title">二、 近14天内是否去过国外、香港以及国内中高风险地区*,或有病例报告的社区？</div>
        <div class="form_cell_item_wrap">
        <div class="form_cell_row_wrap">
        <label class="form_cell_single_wrap">
        <input class="radio_class_name" name="topic2" type="radio" value="$[red]是"/>是</label>
        <label class="form_cell_single_wrap">
        <input class="radio_class_name" name="topic2" type="radio" value="否"/>否</label>
        </div>
        </div>
        <br>
        <div class="form_cell_title">三、近14天内是否接触过来自国外、香港以及国内中高风险地区*的发热或有呼吸道症状的患者？</div>
        <div class="form_cell_item_wrap">
        <div class="form_cell_row_wrap">
        <label class="form_cell_single_wrap">
        <input class="radio_class_name" name="topic3" type="radio" value="$[red]是"/>是</label>
        <label class="form_cell_single_wrap">
        <input class="radio_class_name" name="topic3" type="radio" value="否"/>否</label>
        </div>
        </div>
        <br>
        <div class="form_cell_title">四、近14天内是否与新冠病毒感染者（核酸检测阳性者）有接触？</div>
        <div class="form_cell_item_wrap">
        <div class="form_cell_row_wrap">
        <label class="form_cell_single_wrap">
        <input class="radio_class_name" name="topic4" type="radio" value="$[red]是"/>是</label>
        <label class="form_cell_single_wrap">
        <input class="radio_class_name" name="topic4" type="radio" value="否"/>否</label>
        </div>
        </div>
        <br>
        <div class="form_cell_title">五、近14天内您的家庭或办公室等小范围内是否出现2例及以上发热和/或呼吸道症状的病例？</div>
        <div class="form_cell_item_wrap">
        <div class="form_cell_row_wrap">
        <label class="form_cell_single_wrap">
        <input class="radio_class_name" name="topic5" type="radio" value="$[yellow]是"/>是</label>
        <label class="form_cell_single_wrap">
        <input class="radio_class_name" name="topic5" type="radio" value="否"/>否</label>
        </div>
        </div>
        <br>
        <div class="form_cell_title">六、您14天内从哪个地区来本市？</div>
        <div class="form_cell_item_wrap">
        <div class="form_cell_row_wrap">
        <label class="form_cell_single_wrap">
        <input class="radio_class_name" name="topic6" type="radio" value="一直在本市"/>一直在本市</label>
        </div>
        <div class="form_cell_row_wrap">
        <label class="form_cell_single_wrap">
        <input class="radio_class_name" name="topic6" type="radio" value="$[red]国内"/>国内:<input class="input_class_name" type="text" name="topic6Value1" style="width:100px" value="">
        省 <input class="input_class_name" type="text" name="topic6Value2" style="width:100px" value="">
        市 <input class="input_class_name" type="text" name="topic6Value3" style="width:100px" value="">
        区</label>
        </div>
        <div class="form_cell_row_wrap">
        <label class="form_cell_single_wrap">
        <input class="radio_class_name" name="topic6" type="radio" value="$[yellow]香港口澳门口台湾"/>香港口澳门口台湾</label>
        </div>
        <div class="form_cell_row_wrap">
        <label class="form_cell_single_wrap">
        <input class="radio_class_name" name="topic6" type="radio" value="$[red]境外"/>境外：(填写国家或地区）<input class="input_class_name" type="text" name="topic6Value4" style="width:100px" value="">
        </label>
        </div>
        <div class="form_cell_title">本人保证，以上内容真实无误，如有瞒报，将承担法律责任。</div>
        </div>
        </div>
        </form>
        
        <script>
        const datas = [{
                time: '2021-01-01',
                value: '6.5'
            },
            {
                time: '2021-01-01',
                value: '7'
            },
            {
                time: '2021-01-02',
                value: '6.5'
            }, {
                time: '2021-01-02',
                value: '6'
            }, {
                time: '2021-01-03',
                value: '6.5'
            }
        ]
        let currentArr = []
        datas.map(item => {
            if (currentArr.indexOf(item.time) === -1) {
                currentArr = [...currentArr, item.time]
            }
        })
        console.log(currentArr)
        let dataArr = []
        currentArr.forEach(element => {
            const arr = datas.filter(item => item.time === element)
                .sort((item1, item2) => {
                    return Math.abs(item1.value) - Math.abs(item2.value)
                })
            dataArr = [...dataArr, arr]
        });
        console.log(dataArr)
    </script>
</body>

</html>